﻿/**
 * @file		ct_dd_pmc_crg.c
 * @brief		PMC CRG11 driver Component Test
 * @note		None
 * @attention	None
 * 
 * <B><I>Copyright 2016 Socionext Inc.</I></B>
 */

#include <stdlib.h>
#include <string.h>
#include "driver_common.h"
#include "dd_pmc_crg.h"
#include "pmc.h"

/*----------------------------------------------------------------------*/
/* Definition															*/
/*----------------------------------------------------------------------*/
// Nothing Special

/*----------------------------------------------------------------------*/
/* Enumeration															*/
/*----------------------------------------------------------------------*/
// Nothing Special

/*----------------------------------------------------------------------*/
/* Structure															*/
/*----------------------------------------------------------------------*/
// Nothing Special

/*----------------------------------------------------------------------*/
/* Global Data															*/
/*----------------------------------------------------------------------*/
// Nothing Special

/*----------------------------------------------------------------------*/
/* Local Method Definition												*/
/*----------------------------------------------------------------------*/
// Nothing Special

/*----------------------------------------------------------------------*/
/* Local Function														*/
/*----------------------------------------------------------------------*/
// Nothing Special

/*----------------------------------------------------------------------*/
/* Global Function														*/
/*----------------------------------------------------------------------*/
/**
 * @brief  Command main function for CRG test.
 * @param  int argc	:The number of parameters
 *		   char** argv	:The value of parameters
 * @return VOID
 *
 */
VOID Ct_Dd_Pmc_Crg_Main(int argc, char** argv)
{
	int					param3;
	int					param4;
	ULONG				data = 0;
	ULONG				reg_data = 0;
	
	if(strcmp(argv[1], "bypass") == 0){
		// CRPLC.PLLBYPASS register
		if(strcmp(argv[2], "set") == 0){
			// get 3rd paramter.
			param3 = atoi(argv[3]);
			if ((param3 == 0) || (param3 == 1)) {
				// Set
				Dd_PMC_CRG11_Set_CRPLC_PLLBYPASS(param3);
				Ddim_Print(("Dd_PMC_CRG11_Set_CRPLC_PLLBYPASS() : execute\n"));
				// register data output.
				Ddim_Print(("--- CRG Register ---\n"));
				Ddim_Print(("CRPLC : 0x%08x\n", IO_PMC.CRG11.CRPLC.word));
				Ddim_Print(("--------------------\n"));
			}
			else {
				Ddim_Print(("please check 3rd parameter!!\n"));
			}
		}
		else if (strcmp(argv[2], "get") == 0) {
			// Get
			data = Dd_PMC_CRG11_Get_CRPLC_PLLBYPASS();
			Ddim_Print(("Dd_PMC_CRG11_Get_CRPLC_PLLBYPASS() : execute\n"));
			// register data output.
			Ddim_Print(("--- CTC Register ---\n"));
			Ddim_Print(("CRPLC : 0x%08x\n", IO_PMC.CRG11.CRPLC.word));
			// get data output.
			Ddim_Print(("--- Get data -------\n"));
			Ddim_Print(("bypass = %d\n", data));
			Ddim_Print(("--------------------\n"));
		}
		else {
			Ddim_Print(("please check 2nd parameter!!\n"));
		}
	}
	else if(strcmp(argv[1], "stopen") == 0){
		// CRSTP.STOPEN register
		if(strcmp(argv[2], "set") == 0){
			// get 3rd paramter.
			param3 = atoi(argv[3]);
			if ((param3 == 0) || (param3 == 1)) {
				// Set
				Dd_PMC_CRG11_Set_CRSTP_STOPEN(param3);
				Ddim_Print(("Dd_PMC_CRG11_Set_CRSTP_STOPEN() : execute\n"));
				// register data output.
				Ddim_Print(("--- CRG Register ---\n"));
				Ddim_Print(("CRSTP : 0x%08x\n", IO_PMC.CRG11.CRSTP.word));
				Ddim_Print(("--------------------\n"));
			}
			else {
				Ddim_Print(("please check 3rd parameter!!\n"));
			}
		}
		else if (strcmp(argv[2], "get") == 0) {
			// Get
			data = Dd_PMC_CRG11_Get_CRSTP_STOPEN();
			Ddim_Print(("Dd_PMC_CRG11_Get_CRSTP_STOPEN() : execute\n"));
			// register data output.
			Ddim_Print(("--- CTC Register ---\n"));
			Ddim_Print(("CRSTP : 0x%08x\n", IO_PMC.CRG11.CRSTP.word));
			// get data output.
			Ddim_Print(("--- Get data -------\n"));
			Ddim_Print(("stopen = %d\n", data));
			Ddim_Print(("--------------------\n"));
		}
		else {
			Ddim_Print(("please check 2nd parameter!!\n"));
		}
	}
	else if(strcmp(argv[1], "stopmnt") == 0){
		// CRSTP.STOPMNT register
		if(strcmp(argv[2], "set") == 0){
			// get 3rd paramter.
			param3 = atoi(argv[3]);
			if ((param3 == 0) || (param3 == 1)) {
				// Set
				Dd_PMC_CRG11_Set_CRSTP_STOPMNT(param3);
				Ddim_Print(("Dd_PMC_CRG11_Set_CRSTP_STOPMNT() : execute\n"));
				// register data output.
				Ddim_Print(("--- CRG Register ---\n"));
				Ddim_Print(("CRSTP : 0x%08x\n", IO_PMC.CRG11.CRSTP.word));
				Ddim_Print(("--------------------\n"));
			}
			else {
				Ddim_Print(("please check 3rd parameter!!\n"));
			}
		}
		else if (strcmp(argv[2], "get") == 0) {
			// Get
			data = Dd_PMC_CRG11_Get_CRSTP_STOPMNT();
			Ddim_Print(("Dd_PMC_CRG11_Get_CRSTP_STOPMNT() : execute\n"));
			// register data output.
			Ddim_Print(("--- CTC Register ---\n"));
			Ddim_Print(("CRSTP : 0x%08x\n", IO_PMC.CRG11.CRSTP.word));
			// get data output.
			Ddim_Print(("--- Get data -------\n"));
			Ddim_Print(("stopmnt = %d\n", data));
			Ddim_Print(("--------------------\n"));
		}
		else {
			Ddim_Print(("please check 2nd parameter!!\n"));
		}
	}
	else if(strcmp(argv[1], "arstmode") == 0){
		// CRRSC.ARSTMODE register
		if(strcmp(argv[2], "set") == 0){
			// get 3rd paramter.
			param3 = atoi(argv[3]);
			if ((param3 >= 0) && (param3 <= 15)) {
				// Set
				Dd_PMC_CRG11_Set_CRRSC_ARSTMODE(param3);
				Ddim_Print(("Dd_PMC_CRG11_Set_CRRSC_ARSTMODE() : execute\n"));
				// register data output.
				Ddim_Print(("--- CRG Register ---\n"));
				Ddim_Print(("CRRSC : 0x%08x\n", IO_PMC.CRG11.CRRSC.word));
				Ddim_Print(("--------------------\n"));
			}
			else {
				Ddim_Print(("please check 3rd parameter!!\n"));
			}
		}
		else if (strcmp(argv[2], "get") == 0) {
			// Get
			data = Dd_PMC_CRG11_Get_CRRSC_ARSTMODE();
			Ddim_Print(("Dd_PMC_CRG11_Get_CRRSC_ARSTMODE() : execute\n"));
			// register data output.
			Ddim_Print(("--- CTC Register ---\n"));
			Ddim_Print(("CRRSC : 0x%08x\n", IO_PMC.CRG11.CRRSC.word));
			// get data output.
			Ddim_Print(("--- Get data -------\n"));
			Ddim_Print(("arstmode = %d\n", data));
			Ddim_Print(("--------------------\n"));
		}
		else {
			Ddim_Print(("please check 2nd parameter!!\n"));
		}
	}
	else if(strcmp(argv[1], "swrstm") == 0){
		// CRRSC.SWRSTM register
		if(strcmp(argv[2], "set") == 0){
			// get 3rd paramter.
			param3 = atoi(argv[3]);
			if ((param3 == 0) || (param3 == 1)) {
				// Set
				Dd_PMC_CRG11_Set_CRRSC_SWRSTM(param3);
				Ddim_Print(("Dd_PMC_CRG11_Set_CRRSC_SWRSTM() : execute\n"));
				// register data output.
				Ddim_Print(("--- CRG Register ---\n"));
				Ddim_Print(("CRRSC : 0x%08x\n", IO_PMC.CRG11.CRRSC.word));
				Ddim_Print(("--------------------\n"));
			}
			else {
				Ddim_Print(("please check 3rd parameter!!\n"));
			}
		}
		else if (strcmp(argv[2], "get") == 0) {
			// Get
			data = Dd_PMC_CRG11_Get_CRRSC_SWRSTM();
			Ddim_Print(("Dd_PMC_CRG11_Get_CRRSC_SWRSTM() : execute\n"));
			// register data output.
			Ddim_Print(("--- CTC Register ---\n"));
			Ddim_Print(("CRRSC : 0x%08x\n", IO_PMC.CRG11.CRRSC.word));
			// get data output.
			Ddim_Print(("--- Get data -------\n"));
			Ddim_Print(("swrstm = %d\n", data));
			Ddim_Print(("--------------------\n"));
		}
		else {
			Ddim_Print(("please check 2nd parameter!!\n"));
		}
	}
	else if(strcmp(argv[1], "wdrstm") == 0){
		// CRRSC.WDRSTM register
		if(strcmp(argv[2], "set") == 0){
			// get 3rd paramter.
			param3 = atoi(argv[3]);
			if ((param3 == 0) || (param3 == 1)) {
				// Set
				Dd_PMC_CRG11_Set_CRRSC_WDRSTM(param3);
				Ddim_Print(("Dd_PMC_CRG11_Set_CRRSC_WDRSTM() : execute\n"));
				// register data output.
				Ddim_Print(("--- CRG Register ---\n"));
				Ddim_Print(("CRRSC : 0x%08x\n", IO_PMC.CRG11.CRRSC.word));
				Ddim_Print(("--------------------\n"));
			}
			else {
				Ddim_Print(("please check 3rd parameter!!\n"));
			}
		}
		else if (strcmp(argv[2], "get") == 0) {
			// Get
			data = Dd_PMC_CRG11_Get_CRRSC_WDRSTM();
			Ddim_Print(("Dd_PMC_CRG11_Get_CRRSC_WDRSTM() : execute\n"));
			// register data output.
			Ddim_Print(("--- CTC Register ---\n"));
			Ddim_Print(("CRRSC : 0x%08x\n", IO_PMC.CRG11.CRRSC.word));
			// get data output.
			Ddim_Print(("--- Get data -------\n"));
			Ddim_Print(("wdrstm = %d\n", data));
			Ddim_Print(("--------------------\n"));
		}
		else {
			Ddim_Print(("please check 2nd parameter!!\n"));
		}
	}
	else if(strcmp(argv[1], "swrstreq") == 0){
		// CSWRS.SWRSTREQ register
		if(strcmp(argv[2], "reset") == 0){
			// Reset
			Dd_PMC_CRG11_Reset_CSWRS_SWRSTREQ();
			Ddim_Print(("Dd_PMC_CRG11_Reset_CSWRS_SWRSTREQ() : execute\n"));
			// register data output.
			Ddim_Print(("--- CRG Register ---\n"));
			Ddim_Print(("CRSWR : 0x%08x\n", IO_PMC.CRG11.CRSWR.word));
			Ddim_Print(("--------------------\n"));
		}
		else if (strcmp(argv[2], "get") == 0) {
			// Get
			data = Dd_PMC_CRG11_Get_CRSWRS_SWRSTREQ();
			Ddim_Print(("Dd_PMC_CRG11_Get_CRSWRS_SWRSTREQ() : execute\n"));
			// register data output.
			Ddim_Print(("--- CTC Register ---\n"));
			Ddim_Print(("CRSWR : 0x%08x\n", IO_PMC.CRG11.CRSWR.word));
			// get data output.
			Ddim_Print(("--- Get data -------\n"));
			Ddim_Print(("swrstreq = %d\n", data));
			Ddim_Print(("--------------------\n"));
		}
		else {
			Ddim_Print(("please check 2nd parameter!!\n"));
		}
	}
	else if(strcmp(argv[1], "wdrst") == 0){
		// CRRSM.WDRST register
		if(strcmp(argv[2], "clear") == 0){
			// Clear
			Dd_PMC_CRG11_Clear_CRRSM_WDRST();
			Ddim_Print(("Dd_PMC_CRG11_Clear_CRRSM_WDRST() : execute\n"));
			// register data output.
			Ddim_Print(("--- CRG Register ---\n"));
			Ddim_Print(("CRRSM : 0x%08x\n", IO_PMC.CRG11.CRRSM.word));
			Ddim_Print(("--------------------\n"));
		}
		else if (strcmp(argv[2], "get") == 0) {
			// Get
			data = Dd_PMC_CRG11_Get_CRRSM_WDRST();
			Ddim_Print(("Dd_PMC_CRG11_Get_CRRSM_WDRST() : execute\n"));
			// register data output.
			Ddim_Print(("--- CTC Register ---\n"));
			Ddim_Print(("CRRSM : 0x%08x\n", IO_PMC.CRG11.CRRSM.word));
			// get data output.
			Ddim_Print(("--- Get data -------\n"));
			Ddim_Print(("wdrst = %d\n", data));
			Ddim_Print(("--------------------\n"));
		}
		else {
			Ddim_Print(("please check 2nd parameter!!\n"));
		}
	}
	else if(strcmp(argv[1], "swrst") == 0){
		// CRRSM.SWRST register
		if(strcmp(argv[2], "clear") == 0){
			// Clear
			Dd_PMC_CRG11_Clear_CRRSM_SWRST();
			Ddim_Print(("Dd_PMC_CRG11_Clear_CRRSM_SWRST() : execute\n"));
			// register data output.
			Ddim_Print(("--- CRG Register ---\n"));
			Ddim_Print(("CRRSM : 0x%08x\n", IO_PMC.CRG11.CRRSM.word));
			Ddim_Print(("--------------------\n"));
		}
		else if (strcmp(argv[2], "get") == 0) {
			// Get
			data = Dd_PMC_CRG11_Get_CRRSM_SWRST();
			Ddim_Print(("Dd_PMC_CRG11_Get_CRRSM_SWRST() : execute\n"));
			// register data output.
			Ddim_Print(("--- CTC Register ---\n"));
			Ddim_Print(("CRRSM : 0x%08x\n", IO_PMC.CRG11.CRRSM.word));
			// get data output.
			Ddim_Print(("--- Get data -------\n"));
			Ddim_Print(("swrst = %d\n", data));
			Ddim_Print(("--------------------\n"));
		}
		else {
			Ddim_Print(("please check 2nd parameter!!\n"));
		}
	}
	else if(strcmp(argv[1], "poreset") == 0){
		// CRRSM.PORESET register
		if(strcmp(argv[2], "clear") == 0){
			// Clear
			Dd_PMC_CRG11_Clear_CRRSM_PORST();
			Ddim_Print(("Dd_PMC_CRG11_Clear_CRRSM_PORST() : execute\n"));
			// register data output.
			Ddim_Print(("--- CRG Register ---\n"));
			Ddim_Print(("CRRSM : 0x%08x\n", IO_PMC.CRG11.CRRSM.word));
			Ddim_Print(("--------------------\n"));
		}
		else if (strcmp(argv[2], "get") == 0) {
			// Get
			data = Dd_PMC_CRG11_Get_CRRSM_PORST();
			Ddim_Print(("Dd_PMC_CRG11_Get_CRRSM_PORST() : execute\n"));
			// register data output.
			Ddim_Print(("--- CTC Register ---\n"));
			Ddim_Print(("CRRSM : 0x%08x\n", IO_PMC.CRG11.CRRSM.word));
			// get data output.
			Ddim_Print(("--- Get data -------\n"));
			Ddim_Print(("poreset = %d\n", data));
			Ddim_Print(("--------------------\n"));
		}
		else {
			Ddim_Print(("please check 2nd parameter!!\n"));
		}
	}
	else if(strcmp(argv[1], "dchreq") == 0){
		// CRCDC.DCHREQ register
		if(strcmp(argv[2], "set") == 0){
			// get 3rd paramter.
			param3 = atoi(argv[3]);
			if ((param3 == 0) || (param3 == 1)) {
				// Set
				Dd_PMC_CRG11_Set_CRCDC_DCHREQ(param3);
				Ddim_Print(("Dd_PMC_CRG11_Set_CRCDC_DCHREQ() : execute\n"));
				// register data output.
				Ddim_Print(("--- CRG Register ---\n"));
				Ddim_Print(("CRCDC : 0x%08x\n", IO_PMC.CRG11.CRCDC.word));
				Ddim_Print(("--------------------\n"));
			}
			else {
				Ddim_Print(("please check 3rd parameter!!\n"));
			}
		}
		else if (strcmp(argv[2], "get") == 0) {
			// Get
			data = Dd_PMC_CRG11_Get_CRCDC_DCHREQ();
			Ddim_Print(("Dd_PMC_CRG11_Get_CRCDC_DCHREQ() : execute\n"));
			// register data output.
			Ddim_Print(("--- CTC Register ---\n"));
			Ddim_Print(("CRCDC : 0x%08x\n", IO_PMC.CRG11.CRCDC.word));
			// get data output.
			Ddim_Print(("--- Get data -------\n"));
			Ddim_Print(("dchreq = %d\n", data));
			Ddim_Print(("--------------------\n"));
		}
		else {
			Ddim_Print(("please check 2nd parameter!!\n"));
		}
	}
	else if(strcmp(argv[1], "divmode") == 0){
		// CRDMx.DIVMODE register
		if(strcmp(argv[2], "set") == 0){
			// Set
			// get 4th paramter.
			param4 = atoi(argv[4]);
			if ((param4 < 0) || (param4 > 255)) {
				Ddim_Print(("please check 4th parameter!!\n"));
				return;
			}
			
			// get 3rd paramter.
			param3 = atoi(argv[3]);
			switch(param3) {
				case 0:		// CRDM0.
					Dd_PMC_CRG11_Set_CRDM0_DIVMODE(param4);
					reg_data = IO_PMC.CRG11.CRDM0.word;
					break;
				case 1:		// CRDM1.
					Dd_PMC_CRG11_Set_CRDM1_DIVMODE(param4);
					reg_data = IO_PMC.CRG11.CRDM1.word;
					break;
				case 3:		// CRDM3.
					Dd_PMC_CRG11_Set_CRDM3_DIVMODE(param4);
					reg_data = IO_PMC.CRG11.CRDM3.word;
					break;
				case 4:		// CRDM4.
					Dd_PMC_CRG11_Set_CRDM4_DIVMODE(param4);
					reg_data = IO_PMC.CRG11.CRDM4.word;
					break;
				case 5:		// CRDM5.
					Dd_PMC_CRG11_Set_CRDM5_DIVMODE(param4);
					reg_data = IO_PMC.CRG11.CRDM5.word;
					break;
				default:
					Ddim_Print(("please check 3rd parameter!!\n"));
					break;
			}
			
			Ddim_Print(("Dd_PMC_CRG11_Set_CRDM%d_DIVMODE() : execute\n", param3));
			// register data output.
			Ddim_Print(("--- CRG Register ---\n"));
			Ddim_Print(("CRDM%d : 0x%08x\n", param3, reg_data));
			Ddim_Print(("--------------------\n"));
		}
		else if (strcmp(argv[2], "get") == 0) {
			// Get
			// get 3rd paramter.
			param3 = atoi(argv[3]);
			switch(param3) {
				case 0:		// CRDM0.
					data = Dd_PMC_CRG11_Get_CRDM0_DIVMODE();
					reg_data = IO_PMC.CRG11.CRDM0.word;
					break;
				case 1:		// CRDM1.
					data = Dd_PMC_CRG11_Get_CRDM1_DIVMODE();
					reg_data = IO_PMC.CRG11.CRDM1.word;
					break;
				case 3:		// CRDM3.
					data = Dd_PMC_CRG11_Get_CRDM3_DIVMODE();
					reg_data = IO_PMC.CRG11.CRDM3.word;
					break;
				case 4:		// CRDM4.
					data = Dd_PMC_CRG11_Get_CRDM4_DIVMODE();
					reg_data = IO_PMC.CRG11.CRDM4.word;
					break;
				case 5:		// CRDM5.
					data = Dd_PMC_CRG11_Get_CRDM5_DIVMODE();
					reg_data = IO_PMC.CRG11.CRDM5.word;
					break;
				default:
					Ddim_Print(("please check 3rd parameter!!\n"));
					return;
			}
			
			Ddim_Print(("Dd_PMC_CRG11_Get_CRDM%d_DIVMODE() : execute\n", param3));
			// register data output.
			Ddim_Print(("--- CRG Register ---\n"));
			Ddim_Print(("CRDM%d : 0x%08x\n", param3, reg_data));
			// get data output.
			Ddim_Print(("--- Get data -------\n"));
			Ddim_Print(("clock kind = %d\n", param3));
			Ddim_Print(("divmode    = %d\n", data));
			Ddim_Print(("--------------------\n"));
		}
		else {
			Ddim_Print(("please check 2nd parameter!!\n"));
		}
	}
	else if(strcmp(argv[1], "csysreq_r") == 0){
		// CRLPx.CSYSREQ_R register
		if(strcmp(argv[2], "set") == 0){
			// Set
			// get 4th paramter.
			param4 = atoi(argv[4]);
			if ((param4 < 0) || (param4 > 255)) {
				Ddim_Print(("please check 4th parameter!!\n"));
				return;
			}
			
			// get 3rd paramter.
			param3 = atoi(argv[3]);
			switch(param3) {
				case 0:		// CRLP0.
					Dd_PMC_CRG11_Set_CRLP0_CSYSREQ_R(param4);
					reg_data = IO_PMC.CRG11.CRLP0.word;
					break;
				case 1:		// CRLP1.
					Dd_PMC_CRG11_Set_CRLP0_CSYSREQ_R(param4);
					reg_data = IO_PMC.CRG11.CRLP1.word;
					break;
				case 3:		// CRLP3.
					Dd_PMC_CRG11_Set_CRLP0_CSYSREQ_R(param4);
					reg_data = IO_PMC.CRG11.CRLP3.word;
					break;
				case 4:		// CRLP4.
					Dd_PMC_CRG11_Set_CRLP0_CSYSREQ_R(param4);
					reg_data = IO_PMC.CRG11.CRLP4.word;
					break;
				case 5:		// CRLP5.
					Dd_PMC_CRG11_Set_CRLP0_CSYSREQ_R(param4);
					reg_data = IO_PMC.CRG11.CRLP5.word;
					break;
				default:
					Ddim_Print(("please check 3rd parameter!!\n"));
					break;
			}
			
			Ddim_Print(("Dd_PMC_CRG11_Set_CRLP%d_CSYSREQ_R() : execute\n", param3));
			// register data output.
			Ddim_Print(("--- CRG Register ---\n"));
			Ddim_Print(("CRLP%d : 0x%08x\n", param3, reg_data));
			Ddim_Print(("--------------------\n"));
		}
		else if (strcmp(argv[2], "get") == 0) {
			// Get
			// get 3rd paramter.
			param3 = atoi(argv[3]);
			switch(param3) {
				case 0:		// CRLP0.
					data = Dd_PMC_CRG11_Get_CRLP0_CSYSREQ_R();
					reg_data = IO_PMC.CRG11.CRLP0.word;
					break;
				case 1:		// CRLP1.
					data = Dd_PMC_CRG11_Get_CRLP1_CSYSREQ_R();
					reg_data = IO_PMC.CRG11.CRLP1.word;
					break;
				case 3:		// CRLP3.
					data = Dd_PMC_CRG11_Get_CRLP3_CSYSREQ_R();
					reg_data = IO_PMC.CRG11.CRLP3.word;
					break;
				case 4:		// CRLP4.
					data = Dd_PMC_CRG11_Get_CRLP4_CSYSREQ_R();
					reg_data = IO_PMC.CRG11.CRLP4.word;
					break;
				case 5:		// CRLP5.
					data = Dd_PMC_CRG11_Get_CRLP5_CSYSREQ_R();
					reg_data = IO_PMC.CRG11.CRLP5.word;
					break;
				default:
					Ddim_Print(("please check 3rd parameter!!\n"));
					return;
			}
			
			Ddim_Print(("Dd_PMC_CRG11_Get_CRLP%d_CSYSREQ_R() : execute\n", param3));
			// register data output.
			Ddim_Print(("--- CRG Register ---\n"));
			Ddim_Print(("CRLP%d : 0x%08x\n", param3, reg_data));
			// get data output.
			Ddim_Print(("--- Get data -------\n"));
			Ddim_Print(("clock kind = %d\n", param3));
			Ddim_Print(("csysreq_r  = %d\n", data));
			Ddim_Print(("--------------------\n"));
		}
		else {
			Ddim_Print(("please check 2nd parameter!!\n"));
		}
	}
	else if(strcmp(argv[1], "cen") == 0){
		// CRLPx.CEN register
		if (strcmp(argv[2], "get") == 0) {
			// Get
			// get 3rd paramter.
			param3 = atoi(argv[3]);
			switch(param3) {
				case 0:		// CRLP0.
					data = Dd_PMC_CRG11_Get_CRLP0_CEN();
					reg_data = IO_PMC.CRG11.CRLP0.word;
					break;
				case 1:		// CRLP1.
					data = Dd_PMC_CRG11_Get_CRLP1_CEN();
					reg_data = IO_PMC.CRG11.CRLP1.word;
					break;
				case 3:		// CRLP3.
					data = Dd_PMC_CRG11_Get_CRLP3_CEN();
					reg_data = IO_PMC.CRG11.CRLP3.word;
					break;
				case 4:		// CRLP4.
					data = Dd_PMC_CRG11_Get_CRLP4_CEN();
					reg_data = IO_PMC.CRG11.CRLP4.word;
					break;
				case 5:		// CRLP5.
					data = Dd_PMC_CRG11_Get_CRLP5_CEN();
					reg_data = IO_PMC.CRG11.CRLP5.word;
					break;
				default:
					Ddim_Print(("please check 3rd parameter!!\n"));
					return;
			}
			
			Ddim_Print(("Dd_PMC_CRG11_Get_CRLP%d_CEN() : execute\n", param3));
			// register data output.
			Ddim_Print(("--- CRG Register ---\n"));
			Ddim_Print(("CRLP%d : 0x%08x\n", param3, reg_data));
			// get data output.
			Ddim_Print(("--- Get data -------\n"));
			Ddim_Print(("clock kind = %d\n", param3));
			Ddim_Print(("cen        = %d\n", data));
			Ddim_Print(("--------------------\n"));
		}
		else {
			Ddim_Print(("please check 2nd parameter!!\n"));
		}
	}
	else{
		Ddim_Print(("please check 1st parameter!!\n"));
	}
}
